from frame.bases.base_user import BaseUser


class SearchGoods(BaseUser):

    def list(self, name):
        params = {
            "keyword": name,
            "page": 1,
            "limit": 10,
            "categoryId": 0
        }
        list_req = {
            "url": "goods/list?",
            "method": "get",
            "params": params
        }
        list_r = self.send_api(list_req)
        return list_r.json()
